#define _GNU_SOURCE
#include <stdio.h>
#include <search.h>
#include <string.h>
#include <stdlib.h>
int main()
{
	ENTRY e, *ret;
	struct hsearch_data* ht;
	ht = (struct hsearch_data *)calloc(sizeof(struct hsearch_data),1);
	hcreate_r(10,ht);
	e.key="name";
	e.data="xddai";
	ENTRY f;
	ENTRY *value;
//	**value=f;
	hsearch_r(e,ENTER,&value,ht);
	hsearch_r(e,FIND,&value,ht);
	printf("%s\n",value->data);
	hdestroy_r(ht);

}
